{extend name="default/base/base_member" /}
{block name="member_main"}



<div class="dsm-default-form">
    <form method="post" id="cash_form" action="{:url('Predeposit/pd_cash_add')}">
        <dl>
            <dt><i class="required">*</i>{$Think.lang.withdrawal_amount}：</dt>
            <dd><input name="pdc_amount" type="text" class="text w50" id="pdc_amount" maxlength="10" ><em class="add-on">
                    <i class="iconfont">&#xe65c;</i></em> （{$Think.lang.current_available_amount}：<strong class="orange">{:floatval($member_info.available_predeposit)}</strong>&nbsp;&nbsp;{$Think.lang.ds_yuan}）<span></span>
                <p class="hint mt5"></p>
            </dd>
        </dl>
        <dl>
            <dt><i class="required">*</i>{$Think.lang.collection_bank}：</dt>
            <dd><input name="pdc_bank_name" type="text" class="text w200" id="pdc_bank_name" maxlength="40"/><span></span>
                <p class="hint">{$Think.lang.withdrawal_information1}</p>
            </dd>
        </dl>
        <dl>
            <dt><i class="required">*</i>{$Think.lang.collection_account}：</dt>
            <dd><input name="pdc_bank_no" type="text" class="text w200" id="pdc_bank_no" maxlength="30"/><span></span>
                <p class="hint">{$Think.lang.withdrawal_information2}</p>
            </dd>
        </dl>
        <dl>
            <dt><i class="required">*</i>{$Think.lang.name_account_holder}：</dt>
            <dd><input name="pdc_bank_user" type="text" class="text w100" id="pdc_bank_user" maxlength="10"/><span></span>
                <p class="hint">{$Think.lang.collection_account_name}</p>
            </dd>
        </dl>
        <dl>
            <dt><i class="required">*</i>{$Think.lang.payment_password}：</dt>
            <dd><input name="password" type="password" class="text w100" id="password" maxlength="20"/><span></span>
                <p class="hint">
                    {if !$member_info.member_paypwd}
                    <strong class="red">{$Think.lang.withdrawal_information3}</strong><a href="{:url('Membersecurity/auth',['type'=>'modify_paypwd'])}" class="dsm-btn-mini dsm-btn-acidblue vm ml10" target="_blank">{$Think.lang.immediately_set}</a>
                    {/if}
                </p>
            </dd>
        </dl>
        <dl class="bottom"><dt>&nbsp;</dt>
            <dd>
                <input type="submit"  class="submit" value="{$Think.lang.confirm_withdrawal}" />
                <a class="dsm-btn ml10" href="javascript:history.go(-1);">{$Think.lang.cancel_return}</a>
            </dd>
        </dl>
    </form>
</div>



<script type="text/javascript">
    $(function () {
        $('#cash_form').validate({
            submitHandler: function (form) {
                ds_ajaxpost('cash_form', 'url', "{:url('Predeposit/pd_cash_list')}")
            },
            errorPlacement: function (error, element) {
                var error_td = element.parent('dd').children('span');
                error_td.append(error);
            },
            rules: {
                pdc_amount: {
                    required: true,
                    number: true,
                    min: 0.01,
                    max: {$member_info.available_predeposit}
                },
                pdc_bank_name: {
                    required: true
                },
                pdc_bank_no: {
                    required: true
                },
                pdc_bank_user: {
                    required: true
                },
                password: {
                    required: true
                }
            },
            messages: {
                pdc_amount: {
                    required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.enter_withdrawal_amount_correctly}',
                    number: '<i class="iconfont">&#xe64c;</i>{$Think.lang.enter_withdrawal_amount_correctly}',
                    min: '<i class="iconfont">&#xe64c;</i>{$Think.lang.enter_withdrawal_amount_correctly}',
                    max: '<i class="iconfont">&#xe64c;</i>{$Think.lang.enter_withdrawal_amount_correctly}'
                },
                pdc_bank_name: {
                    required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.input_collection_bank}'
                },
                pdc_bank_no: {
                    required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.input_collection_account}'
                },
                pdc_bank_user: {
                    required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.enter_name_account_holder}'
                },
                password: {
                    required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.enter_payment_password}'
                }
            }
        });
    });
</script>





{/block}
